/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package imageuploader.core;

import java.util.Properties;
import org.apache.commons.httpclient.Cookie;


/**
 *
 * @author nir
 */
public abstract class BaseImageHostingServiceImpl implements ImageHostingService{

    public final CustomEvent events = new CustomEvent();
    
    protected String album,
                     uploadBasePath,
                     loginURL,
                     serviceName;
    protected Cookie cookies[];
    protected int numOfFiles = 0;
    
    public BaseImageHostingServiceImpl(Properties props){
        uploadBasePath = props.getProperty("uploadBasePath","");
        album = props.getProperty("defaultAlbum", "");
        loginURL = props.getProperty("loginURL");
        serviceName = props.getProperty("name");
    }
    
    public String toString(){
        return serviceName;
    }
    
    public void setAlbum(String album){
        this.album = album;
    }
    
    protected abstract String getUploadPath();
    protected abstract String getCreateAlbumURL();
}
